﻿using System.Collections.Generic;
using Missbot.Common;

namespace MissRobot.Migrator
{
    public class MigrateMgr : ISingleton
    {
        private List<IMigrator> AllMigs = new();
        
        public void Init()
        {
            AllMigs = AutofacSvc.LoadAllInstanceFromInterface<IMigrator>();
        }

        public void StartMigrate(long QQNum, string UserID)
        {
            foreach (var mig in AllMigs)
            {
                mig.Migrate(QQNum, UserID);
            }
        }
    }
}